From: Matthias Clasen Date: Sat, 8 Oct 2022 12:28:46 +0000 (-0400) Subject: flowbox: Stop using gtk_render_background X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~116^2~1^2~182^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=681a818af29e8a6ab29f94446f0b95fdfe2a169e;p=gtk4.git flowbox: Stop using gtk_render_background The gtk_render_ apis are getting deprecated. --- diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index 16ae39cfb5..38eeeaff64 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -2570,6 +2570,8 @@ gtk_flow_box_snapshot (GtkWidget *widget, cairo_path_t *path; GtkBorder border; const GdkRGBA *border_color; + GtkSnapshot *bg_snapshot; + GskRenderNode *node; if (vertical) path_from_vertical_line_rects (cr, (GdkRectangle *)lines->data, lines->len); @@ -2583,7 +2585,16 @@ gtk_flow_box_snapshot (GtkWidget *widget, cairo_save (cr); cairo_clip (cr); - gtk_render_background (context, cr, x, y, width, height); + + bg_snapshot = gtk_snapshot_new (); + gtk_snapshot_render_background (bg_snapshot, context, x, y, width, height); + node = gtk_snapshot_free_to_node (bg_snapshot); + if (node) + { + gsk_render_node_draw (node, cr); + gsk_render_node_unref (node); + } + cairo_restore (cr); cairo_append_path (cr, path);